@import "@/assets/iconfont/iconfont.css.scss";
/** 设置全局样式 */
#app {
  a:link {
    color: rgba(0, 0, 0, 0.65);
  }
  a:visited {
    color: rgba(0, 0, 0, 0.65);
  }
  a:hover {
    color: rgba(0, 0, 0, 0.65);
  }
  a:active {
    color: #3e71f7;
  }
  .ant-menu-item-selected {
    a {
      color: #3e71f7;
    }
  }
  color: #1e2e4c; // 设置统一颜色
}
// 一级标题
.g-title-1 {
  color: #1e2e4c;
  font-weight: bold;
  font-size: 14px;
  line-height: 24px;
  padding: 8px 0 8px 18px;
  position: relative;

  &::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 20px;
    background: #2663FF;
  }
}

// 二级标题
.g-title-2 {
  color: #1e2e4c;
  font-weight: bold;
  font-size: 14px;
  line-height: 22px;
  padding: 10px 0 10px 12px;
  position: relative;

  &::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: 14px;
    width: 4px;
    height: 14px;
    background: #2663FF;
  }
}
// 单行省略
.ep {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

// 间距缩写
.mt-12 {
  margin-top: 12px;
}
.mt-16 {
  margin-top: 16px;
}
.ml-12 {
  margin-left: 12px;
}

.g-fr {
  float: right;
}

// 去掉按钮左右padding-在table操作列有用
.g-btn-nopadding {
  padding: 0;
  height: auto;
}

// 按钮或tabes之间的分割线
.g-btn-split {
  background: url("@src/img/split.png");
  background-size: 2px 80%;
  background-position: center;
  background-repeat: no-repeat;
  width: 2px;
  height: 100%;
}

// 分割线-伪元素实现
.g-item-divide {
  position: relative;

  & + .g-item-divide::before {
    content: "";
    display: inline-block;
    width: 2px;
    height: 28px;
    position: absolute;
    top: 50%;
    left: 0px;
    transform: translateY(-50%) scaleX(0.5); // scaleX避免视觉上宽度不同
    background: linear-gradient(180deg, rgba(51, 102, 255, 0) 0%, #3366ff 51.04%, rgba(51, 102, 255, 0) 100%);
    opacity: 1;
  }
}
// 图标：设置
.g-icon-setting {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/icon/setting.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：同步
.g-icon-sync {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/icon/sync.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：查看
.g-icon-check {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/icon/eye.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：添加
.g-icon-add {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/add.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：删除
.g-icon-del {
  display: inline-block;
  background-repeat: no-repeat;
  mask-image: url("@src/assets/icons/icon/del.svg");
  width: 16px;
  height: 16px;
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：批量启动
.g-icon-plqd {
  display: inline-block;
  background-repeat: no-repeat;
  mask-image: url("@src/assets/icons/icon/plqd.svg");
  width: 16px;
  height: 16px;
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：批量停止
.g-icon-pltz {
  display: inline-block;
  background-repeat: no-repeat;
  mask-image: url("@src/assets/icons/icon/pltz.svg");
  width: 16px;
  height: 16px;
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：返回
.g-icon-go-back {
  display: inline-block;
  background: url("@src/assets/icons/icon/go-back-active.svg");
  background-size: 16px 16px;
  background-position: center;
  width: 16px;
  height: 16px;
  cursor: pointer;
  background-repeat: no-repeat;
  align-self: center;
    margin-left: 10px;

  &:hover {
    background-image: url("@src/assets/icons/icon/go-back-active.svg");
  }
}
// 图标：编辑
.g-icon-edit {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;

  mask-image: url("@src/assets/icons/icon/edit.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：添加
.g-icon-addrole {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/addrole.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：激活冻结
.g-icon-activation {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;

  mask-image: url("@src/assets/icons/activation.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
  align-self: center;
}
// 图标：重置密码
.g-icon-resetpass {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;

  mask-image: url("@src/assets/icons/resetpass.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
  align-self: center;
}
// 图标：备注
.g-icon-remark {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;

  mask-image: url("@src/assets/icons/icon/remark.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
  align-self: center;
}
// 图标 warning
.g-icon-warning {
  display: inline-block;
  background: url("@src/img/icon_warning.png");
  background-size: 24px 24px;
  background-position: center;
  width: 24px;
  height: 24px;
}
// 图标：风扇
.g-icon-fspz {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  mask-image: url("@src/assets/icons/icon/fspz.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}

// 图标：电源配置
.g-icon-dypz {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  mask-image: url("@src/assets/icons/icon/dianyuanpeizhi.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：板卡型号设置
.g-icon-setting-btn {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  mask-image: url("@src/assets/icons/icon/setting-btn.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：计算器
.g-icon-calc {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  mask-image: url("@src/assets/icons/icon/calc-btn.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：导出
.g-icon-export {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  mask-image: url("@src/assets/icons/icon/export-btn.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：板卡预制设置
.g-icon-ysbkpz {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  mask-image: url("@src/assets/icons/icon/ysbkpz.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：板卡配置
.g-icon-bkcq {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  mask-image: url("@src/assets/icons/icon/bkcq.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}

// 图标：运行中
.g-icon-running {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  mask-image: url("@src/assets/icons/icon/running.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：开启
.g-icon-switchOpen {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  mask-image: url("@src/assets/icons/icon/switchOpen.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 关闭
.g-icon-switchClose {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  mask-image: url("@src/assets/icons/icon/switchClose.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 关闭
.g-icon-fansetIcon {
  display: inline-block;
  background-size: 16px 16px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  mask-image: url("@src/assets/icons/fansetIcon.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：板卡重启
.g-icon-bkcq {
  display: inline-block;
  background-repeat: no-repeat;
  mask-image: url("@src/assets/icons/icon/bkcq.svg");
  width: 16px;
  height: 16px;
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：确认
.g-icon-confirm {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/confirm.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：批量确认
.g-icon-confirms {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/confirm-list.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：同步告警
.g-icon-synchronousWarning {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/synchronous-warning.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：当前告警
.g-icon-alarmNow {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/alarm-now.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  // background-color: #fff;
}
// 图标：面板
.g-icon-plean {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/plean.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  // background-color: #fff;
}
// 图标：详情
.g-icon-tabsDetial {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/tabsDetial.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  // background-color: #fff;
}
// 图标：历史告警
.g-icon-alarmHistory {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/alarm-history.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：当前性能越限
.g-icon-performanceNow {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/performance-now.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  // background-color: #fff;
}
// 图标：历史性能越限
.g-icon-performanceHistory {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/performance-history.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：板卡性能越限
.g-icon-performanceCard {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/performance-card.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：端口性能越限
.g-icon-performancePort {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/performance-port.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：新增曲线
.g-icon-xzqx {
  display: inline-block;
  background-repeat: no-repeat;
  mask-image: url("@src/assets/icons/xzqx.svg");
  width: 16px;
  height: 16px;
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}

// 图标：新增曲线
.g-icon-drqx {
  display: inline-block;
  background-repeat: no-repeat;
  mask-image: url("@src/assets/icons/drqx.svg");
  width: 16px;
  height: 16px;
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}
// 图标：新增曲线
.g-icon-bjqx {
  display: inline-block;
  background-repeat: no-repeat;
  mask-image: url("@src/assets/icons/bjqx.svg");
  width: 16px;
  height: 16px;
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #fff;
}


// 工单状态
.g-icon-workorder-status {
  display: inline-block;
  background-size: 24px 24px;
  background-position: center;
  width: 24px;
  height: 24px;

  // 处理中
  &.workOrderStatusDeal {
    background-image: url("@src/img/icon/workorder1_2.png");
  }
  // 办毕
  &.workOrderStatusSuspend {
    background-image: url("@src/img/icon/workorder2_2.png");
  }
  &.workOrderStatusDone {
    background-image: url("@src/img/icon/workorder3_2.png");
  }
  // 未开始
  &.workOrderStatusNotStarted {
    background-image: url("@src/img/icon/workorder4_2.png");
  }
  
}

// 修改系统设置自动判定switch
.g-switch {
  background: transparent;
  border: 1px solid #2663FF;
  box-sizing: border-box;
  box-shadow: none;

  .ant-switch-inner {
    color: #2663FF;
  }
  .ant-switch-handle {
    top: 1px;
  }
  .ant-switch-handle::before {
    background: #2663FF;
    box-shadow: none;
  }

  &-off {
    border: 1px solid #ccd9ff;
    .ant-switch-inner {
      color: #ccd9ff;
    }

    .ant-switch-handle::before {
      background: #ccd9ff;
    }
  }
  .g-switch-off {
    box-shadow: none;
  }
  .ant-switch:focus {
    outline: none;
    box-shadow: none;
  }
}
// 按钮
.ant-btn {
  display: inline-flex;
  align-items: center;
}

// --------------- 单行文本 截断  省略 --------------
.g-txt-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.g-modal-icon {
  float: left;
  margin-right: 8px;
  font-size: 20px;
  margin-top: -2px;
}

.g-icon-dian {
  display: inline-block;
  background-repeat: no-repeat;
  width: 16px;
  height: 16px;
  mask-image: url("@src/assets/icons/icon/dian.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  background-color: #2663FF;
}
// $btn-primay-bg-color: #2663ff;
// $btn-primay-bg-color-hover: #5182ff;
// 表格页的table上的按钮
.form-list-btns {
  margin-top: 16px;
  > button {
    display: inline-flex;
    align-items: center;
    & + button {
      margin-left: 12px;
    }
    &:first-child {
      margin-left: 0;
    }
    img {
      margin-right: 8px;
    }
  }
}


